Integrand size = 38, antiderivative size = 171 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {1}{8} \left (8 a^3 B+12 a b^2 B+12 a^2 b C+3 b^3 C\right ) x+\frac {\left (16 a^2 b B+4 b^3 B+3 a^3 C+12 a b^2 C\right ) \sin (c+d x)}{6 d}+\frac {b \left (20 a b B+6 a^2 C+9 b^2 C\right ) \cos (c+d x) \sin (c+d x)}{24 d}+\frac {(4 b B+3 a C) (a+b \cos (c+d x))^2 \sin (c+d x)}{12 d}+\frac {C (a+b \cos (c+d x))^3 \sin (c+d x)}{4 d} \]
1/8*(8*B*a^3+12*B*a*b^2+12*C*a^2*b+3*C*b^3)*x+1/6*(16*B*a^2*b+4*B*b^3+3*C* a^3+12*C*a*b^2)*sin(d*x+c)/d+1/24*b*(20*B*a*b+6*C*a^2+9*C*b^2)*cos(d*x+c)* sin(d*x+c)/d+1/12*(4*B*b+3*C*a)*(a+b*cos(d*x+c))^2*sin(d*x+c)/d+1/4*C*(a+b *cos(d*x+c))^3*sin(d*x+c)/d
Time = 1.51 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.82 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {12 \left (8 a^3 B+12 a b^2 B+12 a^2 b C+3 b^3 C\right ) (c+d x)+24 \left (12 a^2 b B+3 b^3 B+4 a^3 C+9 a b^2 C\right ) \sin (c+d x)+24 b \left (3 a b B+3 a^2 C+b^2 C\right ) \sin (2 (c+d x))+8 b^2 (b B+3 a C) \sin (3 (c+d x))+3 b^3 C \sin (4 (c+d x))}{96 d} \]
(12*(8*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 3*b^3*C)*(c + d*x) + 24*(12*a^2*b *B + 3*b^3*B + 4*a^3*C + 9*a*b^2*C)*Sin[c + d*x] + 24*b*(3*a*b*B + 3*a^2*C + b^2*C)*Sin[2*(c + d*x)] + 8*b^2*(b*B + 3*a*C)*Sin[3*(c + d*x)] + 3*b^3* C*Sin[4*(c + d*x)])/(96*d)
Time = 0.68 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3042, 3508, 3042, 3232, 3042, 3232, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3508 |
\(\displaystyle \int (a+b \cos (c+d x))^3 (B+C \cos (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (B+C \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {1}{4} \int (a+b \cos (c+d x))^2 (4 a B+3 b C+(4 b B+3 a C) \cos (c+d x))dx+\frac {C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (4 a B+3 b C+(4 b B+3 a C) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int (a+b \cos (c+d x)) \left (12 B a^2+15 b C a+8 b^2 B+\left (6 C a^2+20 b B a+9 b^2 C\right ) \cos (c+d x)\right )dx+\frac {(3 a C+4 b B) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )+\frac {C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (12 B a^2+15 b C a+8 b^2 B+\left (6 C a^2+20 b B a+9 b^2 C\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {(3 a C+4 b B) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )+\frac {C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {b \left (6 a^2 C+20 a b B+9 b^2 C\right ) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {2 \left (3 a^3 C+16 a^2 b B+12 a b^2 C+4 b^3 B\right ) \sin (c+d x)}{d}+\frac {3}{2} x \left (8 a^3 B+12 a^2 b C+12 a b^2 B+3 b^3 C\right )\right )+\frac {(3 a C+4 b B) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )+\frac {C \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\) |
(C*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(4*d) + (((4*b*B + 3*a*C)*(a + b*C os[c + d*x])^2*Sin[c + d*x])/(3*d) + ((3*(8*a^3*B + 12*a*b^2*B + 12*a^2*b* C + 3*b^3*C)*x)/2 + (2*(16*a^2*b*B + 4*b^3*B + 3*a^3*C + 12*a*b^2*C)*Sin[c + d*x])/d + (b*(20*a*b*B + 6*a^2*C + 9*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/ (2*d))/3)/4
3.8.87.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b^2 Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 1.32 (sec) , antiderivative size = 142, normalized size of antiderivative = 0.83
method | result | size |
parallelrisch | \(\frac {24 \left (3 B a \,b^{2}+3 C \,a^{2} b +C \,b^{3}\right ) \sin \left (2 d x +2 c \right )+8 \left (B \,b^{3}+3 C a \,b^{2}\right ) \sin \left (3 d x +3 c \right )+3 C \sin \left (4 d x +4 c \right ) b^{3}+24 \left (12 B \,a^{2} b +3 B \,b^{3}+4 C \,a^{3}+9 C a \,b^{2}\right ) \sin \left (d x +c \right )+96 x \left (\frac {3}{8} C \,b^{3}+B \,a^{3}+\frac {3}{2} B a \,b^{2}+\frac {3}{2} C \,a^{2} b \right ) d}{96 d}\) | \(142\) |
parts | \(\frac {\left (B \,b^{3}+3 C a \,b^{2}\right ) \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {\left (3 B a \,b^{2}+3 C \,a^{2} b \right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (3 B \,a^{2} b +C \,a^{3}\right ) \sin \left (d x +c \right )}{d}+\frac {B \,a^{3} \left (d x +c \right )}{d}+\frac {C \,b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(154\) |
derivativedivides | \(\frac {C \,b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {B \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+C a \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 B a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 C \,a^{2} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 B \,a^{2} b \sin \left (d x +c \right )+C \,a^{3} \sin \left (d x +c \right )+B \,a^{3} \left (d x +c \right )}{d}\) | \(180\) |
default | \(\frac {C \,b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {B \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+C a \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 B a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 C \,a^{2} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 B \,a^{2} b \sin \left (d x +c \right )+C \,a^{3} \sin \left (d x +c \right )+B \,a^{3} \left (d x +c \right )}{d}\) | \(180\) |
risch | \(\frac {3 b^{3} C x}{8}+a^{3} B x +\frac {3 x B a \,b^{2}}{2}+\frac {3 x C \,a^{2} b}{2}+\frac {3 \sin \left (d x +c \right ) B \,a^{2} b}{d}+\frac {3 B \,b^{3} \sin \left (d x +c \right )}{4 d}+\frac {a^{3} C \sin \left (d x +c \right )}{d}+\frac {9 \sin \left (d x +c \right ) C a \,b^{2}}{4 d}+\frac {C \,b^{3} \sin \left (4 d x +4 c \right )}{32 d}+\frac {\sin \left (3 d x +3 c \right ) B \,b^{3}}{12 d}+\frac {\sin \left (3 d x +3 c \right ) C a \,b^{2}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) B a \,b^{2}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) C \,a^{2} b}{4 d}+\frac {\sin \left (2 d x +2 c \right ) C \,b^{3}}{4 d}\) | \(203\) |
norman | \(\frac {\left (\frac {3}{8} C \,b^{3}+B \,a^{3}+\frac {3}{2} B a \,b^{2}+\frac {3}{2} C \,a^{2} b \right ) x +\left (\frac {3}{8} C \,b^{3}+B \,a^{3}+\frac {3}{2} B a \,b^{2}+\frac {3}{2} C \,a^{2} b \right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15}{4} C \,b^{3}+10 B \,a^{3}+15 B a \,b^{2}+15 C \,a^{2} b \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15}{4} C \,b^{3}+10 B \,a^{3}+15 B a \,b^{2}+15 C \,a^{2} b \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15}{8} C \,b^{3}+5 B \,a^{3}+\frac {15}{2} B a \,b^{2}+\frac {15}{2} C \,a^{2} b \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15}{8} C \,b^{3}+5 B \,a^{3}+\frac {15}{2} B a \,b^{2}+\frac {15}{2} C \,a^{2} b \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4 \left (27 B \,a^{2} b +5 B \,b^{3}+9 C \,a^{3}+15 C a \,b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {\left (24 B \,a^{2} b -12 B a \,b^{2}+8 B \,b^{3}+8 C \,a^{3}-12 C \,a^{2} b +24 C a \,b^{2}-5 C \,b^{3}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (24 B \,a^{2} b +12 B a \,b^{2}+8 B \,b^{3}+8 C \,a^{3}+12 C \,a^{2} b +24 C a \,b^{2}+5 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (144 B \,a^{2} b -36 B a \,b^{2}+32 B \,b^{3}+48 C \,a^{3}-36 C \,a^{2} b +96 C a \,b^{2}-3 C \,b^{3}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {\left (144 B \,a^{2} b +36 B a \,b^{2}+32 B \,b^{3}+48 C \,a^{3}+36 C \,a^{2} b +96 C a \,b^{2}+3 C \,b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(538\) |
1/96*(24*(3*B*a*b^2+3*C*a^2*b+C*b^3)*sin(2*d*x+2*c)+8*(B*b^3+3*C*a*b^2)*si n(3*d*x+3*c)+3*C*sin(4*d*x+4*c)*b^3+24*(12*B*a^2*b+3*B*b^3+4*C*a^3+9*C*a*b ^2)*sin(d*x+c)+96*x*(3/8*C*b^3+B*a^3+3/2*B*a*b^2+3/2*C*a^2*b)*d)/d
Time = 0.27 (sec) , antiderivative size = 136, normalized size of antiderivative = 0.80 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {3 \, {\left (8 \, B a^{3} + 12 \, C a^{2} b + 12 \, B a b^{2} + 3 \, C b^{3}\right )} d x + {\left (6 \, C b^{3} \cos \left (d x + c\right )^{3} + 24 \, C a^{3} + 72 \, B a^{2} b + 48 \, C a b^{2} + 16 \, B b^{3} + 8 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )^{2} + 9 \, {\left (4 \, C a^{2} b + 4 \, B a b^{2} + C b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \]
1/24*(3*(8*B*a^3 + 12*C*a^2*b + 12*B*a*b^2 + 3*C*b^3)*d*x + (6*C*b^3*cos(d *x + c)^3 + 24*C*a^3 + 72*B*a^2*b + 48*C*a*b^2 + 16*B*b^3 + 8*(3*C*a*b^2 + B*b^3)*cos(d*x + c)^2 + 9*(4*C*a^2*b + 4*B*a*b^2 + C*b^3)*cos(d*x + c))*s in(d*x + c))/d
\[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\int \left (B + C \cos {\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right )^{3} \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx \]
Time = 0.21 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.00 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {96 \, {\left (d x + c\right )} B a^{3} + 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} b + 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a b^{2} - 96 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a b^{2} - 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B b^{3} + 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} C b^{3} + 96 \, C a^{3} \sin \left (d x + c\right ) + 288 \, B a^{2} b \sin \left (d x + c\right )}{96 \, d} \]
1/96*(96*(d*x + c)*B*a^3 + 72*(2*d*x + 2*c + sin(2*d*x + 2*c))*C*a^2*b + 7 2*(2*d*x + 2*c + sin(2*d*x + 2*c))*B*a*b^2 - 96*(sin(d*x + c)^3 - 3*sin(d* x + c))*C*a*b^2 - 32*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*b^3 + 3*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*C*b^3 + 96*C*a^3*sin(d*x + c) + 288*B*a^2*b*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 536 vs. \(2 (161) = 322\).
Time = 0.33 (sec) , antiderivative size = 536, normalized size of antiderivative = 3.13 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {3 \, {\left (8 \, B a^{3} + 12 \, C a^{2} b + 12 \, B a b^{2} + 3 \, C b^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (24 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 72 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 72 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 72 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 216 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 120 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 40 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 72 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 216 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 120 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 40 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 72 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 72 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 24 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
1/24*(3*(8*B*a^3 + 12*C*a^2*b + 12*B*a*b^2 + 3*C*b^3)*(d*x + c) + 2*(24*C* a^3*tan(1/2*d*x + 1/2*c)^7 + 72*B*a^2*b*tan(1/2*d*x + 1/2*c)^7 - 36*C*a^2* b*tan(1/2*d*x + 1/2*c)^7 - 36*B*a*b^2*tan(1/2*d*x + 1/2*c)^7 + 72*C*a*b^2* tan(1/2*d*x + 1/2*c)^7 + 24*B*b^3*tan(1/2*d*x + 1/2*c)^7 - 15*C*b^3*tan(1/ 2*d*x + 1/2*c)^7 + 72*C*a^3*tan(1/2*d*x + 1/2*c)^5 + 216*B*a^2*b*tan(1/2*d *x + 1/2*c)^5 - 36*C*a^2*b*tan(1/2*d*x + 1/2*c)^5 - 36*B*a*b^2*tan(1/2*d*x + 1/2*c)^5 + 120*C*a*b^2*tan(1/2*d*x + 1/2*c)^5 + 40*B*b^3*tan(1/2*d*x + 1/2*c)^5 + 9*C*b^3*tan(1/2*d*x + 1/2*c)^5 + 72*C*a^3*tan(1/2*d*x + 1/2*c)^ 3 + 216*B*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 36*C*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 36*B*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 120*C*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 40*B*b^3*tan(1/2*d*x + 1/2*c)^3 - 9*C*b^3*tan(1/2*d*x + 1/2*c)^3 + 24*C* a^3*tan(1/2*d*x + 1/2*c) + 72*B*a^2*b*tan(1/2*d*x + 1/2*c) + 36*C*a^2*b*ta n(1/2*d*x + 1/2*c) + 36*B*a*b^2*tan(1/2*d*x + 1/2*c) + 72*C*a*b^2*tan(1/2* d*x + 1/2*c) + 24*B*b^3*tan(1/2*d*x + 1/2*c) + 15*C*b^3*tan(1/2*d*x + 1/2* c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d
Time = 2.14 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.18 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=B\,a^3\,x+\frac {3\,C\,b^3\,x}{8}+\frac {3\,B\,a\,b^2\,x}{2}+\frac {3\,C\,a^2\,b\,x}{2}+\frac {3\,B\,b^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {C\,a^3\,\sin \left (c+d\,x\right )}{d}+\frac {B\,b^3\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {C\,b^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,b^3\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {3\,B\,a\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {3\,C\,a^2\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {3\,B\,a^2\,b\,\sin \left (c+d\,x\right )}{d}+\frac {9\,C\,a\,b^2\,\sin \left (c+d\,x\right )}{4\,d} \]
B*a^3*x + (3*C*b^3*x)/8 + (3*B*a*b^2*x)/2 + (3*C*a^2*b*x)/2 + (3*B*b^3*sin (c + d*x))/(4*d) + (C*a^3*sin(c + d*x))/d + (B*b^3*sin(3*c + 3*d*x))/(12*d ) + (C*b^3*sin(2*c + 2*d*x))/(4*d) + (C*b^3*sin(4*c + 4*d*x))/(32*d) + (3* B*a*b^2*sin(2*c + 2*d*x))/(4*d) + (3*C*a^2*b*sin(2*c + 2*d*x))/(4*d) + (C* a*b^2*sin(3*c + 3*d*x))/(4*d) + (3*B*a^2*b*sin(c + d*x))/d + (9*C*a*b^2*si n(c + d*x))/(4*d)